const path = require('path')
const fs = require('fs')

// 检查 dist 目录是否存在
const distPath = path.join(__dirname, '..', 'dist')
const serverPath = path.join(distPath, 'server.js')

if (!fs.existsSync(serverPath)) {
    console.error('❌ Server file not found. Please run "npm run build" first.')
    process.exit(1)
}

console.log('🚀 Starting server...')

// 启动服务器
require(serverPath)
